import request from '@/utils/request'
import upload from '@/utils/upload'

// 查询微信小程序用户信息
export function getMiniAppUserInfo() {
  return request({
    url: '/miniapp/getMiniAppUserInfo',
    method: 'get'
  })
}

// 修改微信小程序用户信息
export function updateMiniAppUser(data) {
  return request({
    url: '/miniapp/updateMiniAppUser',
    method: 'post',
	data: data
  })
}

// 用户头像上传
export function uploadAvatar(data) {
  return upload({
    url: '/miniapp/uploadAvatar',
    name: data.name,
    filePath: data.filePath
  })
}